package com.crazyhat.crazyhat.pojo;

import java.util.List;

import org.springframework.web.multipart.MultipartFile;

import com.crazyhat.crazyhat.anno.SensitiveWordAnno;
import com.crazyhat.crazyhat.vaildation.ValidationGroup.InsertValidAtionGroup;
import com.crazyhat.crazyhat.vaildation.ValidationGroup.UpdateValidAtionGroup;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 动态发布实体，支持多文件上传
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PostPublishWithFile {
    
    /**
     * 动态ID
     */
    @NotNull(groups = UpdateValidAtionGroup.class)
    private Integer postId;

    /**
     * 社团ID
     */
    @NotNull(groups = InsertValidAtionGroup.class)
    private Integer clubId;

    /**
     * 标题
     */
    @SensitiveWordAnno
    @Size(max = 30)
    @NotEmpty
    private String title;

    /**
     * 内容
     */
    @SensitiveWordAnno
    @NotEmpty
    private String content;

    /**
     * 文件列表
     */
    private List<MultipartFile> fileList;
}
